package com.boodaba.todocarts;


import com.boodaba.todocarts.domain.ILabelRepository;
import com.boodaba.todocarts.domain.LabelRepository;
import com.boodaba.todocarts.infstr.Db4oStoreContext;
import roboguice.config.AbstractAndroidModule;

public class DbSetModule extends AbstractAndroidModule {
	private final String mDataDir; 
	
	
	public DbSetModule(String appDbDir) {
		super();
		mDataDir = appDbDir;
	}
	
	@Override
	protected void configure() {
		Db4oStoreContext dbSc = new Db4oStoreContext(mDataDir + "/dbfile.db4o");
		LabelRepository labelRepo = new LabelRepository(dbSc);
		
		bind(ILabelRepository.class).toInstance(labelRepo);
	}

}
